home *** CD-ROM | disk | FTP | other *** search
/ APDL Other Worlds / APDL Other Worlds Collection.iso / SF3000 / Extras / !SFskyedit / h / EditSky < prev    next >
Encoding:
Text File  |  2003-09-12  |  1.9 KB  |  57 lines

  1. /*
  2.  *  SFskyedit - Star Fighter 3000 sky colours editor
  3.  *  Sky editing window
  4.  *  Copyright (C) 2001  Chris Bazley
  5.  */
  6.  
  7. #ifndef SFSEditSky_h
  8. #define SFSEditSky_h
  9.  
  10. #include <time.h>
  11. #include <stdbool.h>
  12.  
  13. #include "toolbox.h"
  14. #include "SFformats.h"
  15.  
  16. typedef char colstring[9]; /* "C/bbggrr"+0 */
  17.  
  18. typedef struct _ViewData
  19. {
  20.   ObjectId window_id; /* editing window */
  21.   ObjectId preview_id; /* preview window (if any) */
  22.   ObjectId dispvalues_pane; /* attached pane */
  23.   ObjectId menu; /* attached menu */
  24.  
  25.   SF_SkyColours *sky; /* sky file to edit (flex anchor) */
  26.   char *last_savepath;
  27.   bool changed_since_save;
  28.   int file_date[2]; /* 000000CC DDDDDDDD */
  29.   colstring *icon_validations; /* 24-bit background colours (flex anchor) */
  30.   char *icon_FGcols;           /* Wimp foreground colours (flex anchor) */
  31.   bool selection_exists;
  32.   char selection_start; /* Both are INCLUSIVE */
  33.   char selection_end;   /* e.g. 1st & 2nd band would be start=0, end=1; */
  34.   char caret_position; /* before colour band X (0-63) or -1 for no caret */
  35.   bool has_input_focus;
  36.   clock_t last_scroll;
  37.   bool trap_caret;
  38. } ViewData;
  39.  
  40. extern bool def_trap_caret;
  41.  
  42. extern ObjectId EditSky_create(SF_SkyColours **sky, char *title, bool title_is_file);
  43. extern void EditSky_paste(ViewData *data);
  44. extern void EditSky_clearselection(ViewData *data);
  45. extern void EditSky_set_starheight(ObjectId objectref, int height);
  46. extern void EditSky_set_minheight(ObjectId objectref, int height);
  47. extern void EditSky_preview(ViewData *data);
  48. extern bool EditSky_newfile(ViewData *data, char *title, bool title_is_file);
  49. extern void EditSky_markaschanged(ViewData *data);
  50. extern void EditSky_rowsupdated(ViewData *data, int start_band, int end_band);
  51. extern void EditSky_set_caretpos(ViewData *data, int new_pos);
  52. extern void EditSky_changeselection(ViewData *data, int newsel_start, int newsel_end);
  53. extern void EditSky_openparentdir(ViewData *data);
  54. extern void EditSky_remove_sel(ViewData *view_data);
  55.  
  56. #endif
  57.